Exclude specific directories and subdirectories from du and diff calculations using --exclude-dir and --exclude flags to filter unwanted data.